﻿using System;

class GetMaxMethod

            // Write a method GetMax() with two parameters that returns the bigger of two integers. 
            // Write a program that reads 3 integers from the console and prints the biggest of them using the method GetMax().
{
    static void Main()
    {
        Console.WriteLine("Enter the integers:");
        int a = int.Parse(Console.ReadLine());
        int b = int.Parse(Console.ReadLine());
        int c = int.Parse(Console.ReadLine());
        int biggest = GetMax(a, b, c);
        Console.WriteLine();

        Console.WriteLine("The biggest integer is: {0}.", biggest);
    }

    private static int GetMax(int a, int b)
    {
        return a > b ? a : b;
    }

    private static int GetMax(int a, int b, int c)
    {
        return GetMax(a, GetMax(b, c));
    }
}

